//
//  main.m
//  11-Foundation-练习
//
//  Created by Jason on 15/10/11.
//  Copyright © 2015年 Jason. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "User.h"
#import "Person.h"
#import "Status.h"

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        
        // 初始化用户对象
        User *user = [[User alloc] init];
        user.name = @"Mike";
        user.imageUrl = @"http://sina.weibo.com/abc.png";
        
        NSMutableArray *allStatuses = [NSMutableArray array];
        
        // 第一条微博
        Status *status1 = [[Status alloc] init];
        status1.text = @"hahaah";
        [allStatuses addObject:status1];
        
        [status1 release];
        
        Status *statusOld = [[[Status alloc] init] autorelease];
        statusOld.text = @"哈哈哈";
        
        // 第二条微博: status2转发了statusOld
        Status *status2 = [[Status alloc] init];
        status2.text = @"1231233";
        status2.retweetStatus = statusOld;
        [allStatuses addObject:status2];
        [status2 release];
        
        user.statuses = allStatuses;
        
        [user release];
        
        
    }
    return 0;
}
